package com.bluesky.objectworld.method.reference;

import com.bluesky.objectworld.VirtualMachine;
import com.bluesky.objectworld.method.block.Block;
import com.bluesky.objectworld.primitive.PrimitiveType;

public class StringConstant extends Constant {

	public StringConstant(String literal) {
		super(literal);
	}

	@Override
	public void compile(Block block) {
		object = VirtualMachine.getInstance().world.create(PrimitiveType.String,
				literal.substring(1, literal.length() - 1));
	}

}
